package com.lancoo.ccas53.mapper;
import com.lancoo.ccas53.entity.ViewSchedule;
import com.lancoo.ccas53.pojo.excel.StudentTeachingClassDto;
import com.lancoo.ccas53.pojo.vo.TeachingClassCourseDto;
import org.apache.ibatis.annotations.Param;

import java.util.Arrays;
import java.util.Collection;
import java.util.List;

import com.lancoo.ccas53.entity.TeachingClassStudent;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lancoo.ccas53.config.MybatisRedisCache;
import org.apache.ibatis.annotations.CacheNamespace;

/**
 * <p>
 * 教学班对应的学生 Mapper 接口
 * </p>
 *
 * @author quin.song
 * @since 2024-05-20
 */
@CacheNamespace(implementation = MybatisRedisCache.class, eviction = MybatisRedisCache.class)
public interface TeachingClassStudentMapper extends BaseMapper<TeachingClassStudent> {

    int addBatch(@Param("teachingClassStudentCollection") Collection<TeachingClassStudent> teachingClassStudentCollection);
    int addBatchForRedis(@Param("teachingClassStudentCollection") List<TeachingClassStudent> teachingClassStudentCollection);

    List<String> getScheduledTimeCodes(Long teachingClassId);
    List<ViewSchedule> getScheduledTimeCodesWeek(Long teachingClassId);
    /**
     * 获取教学班学生人数
     * @param teachingClassIds
     * @return
     */
    List<TeachingClassCourseDto> getStudentNumber(@Param("teachingClassIds") List<Long> teachingClassIds);

    List<Long> getTeachingClass(Integer taskId, Long studentId);

    List<StudentTeachingClassDto> getStudentByTeachingClassIds(List<Long> teachingClassIds);
}
